package mythread.demo001;

public class MyThread12_4Test_stop {
    public static void main(String[] args) {


        //sleep中停止计入catch
        try {
            MyThread12_4 thread12 = new MyThread12_4();
            thread12.start();
            thread12.sleep(200);//保证thread12启动后再打断
            //打断MyThread12_4的sleep状态，抛出InterruptedException异常
            thread12.interrupt();
        } catch (InterruptedException e) {
            System.out.println("main catch");
            e.printStackTrace();
        }
        System.out.println("end");

    }
}
